package com.lazycat.backend.controller.chat;

import com.lazycat.backend.service.chat.GetMessageSingleEndService;
import com.lazycat.backend.service.chat.GetRelationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RestController
public class GetRelationController {
    @Autowired
    private GetRelationService getRelationService;

    @PostMapping("chat/getRelation/")
    public HashMap<String, Object> get(@RequestBody Map<String, String> map) {
        Integer user_id = Integer.parseInt(map.get("user_id"));
        return getRelationService.get(user_id);
    }
}
